<%@page import="java.text.SimpleDateFormat"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

<t:wrapper>
    <jsp:body> 
		<h2>${subject.name}</h2>
		<ul>
			<c:forEach var="lesson" items="${lessons}">
				<li><a href="${pageContext.request.contextPath}/User/Teacher/CheckAbsence?lesson=${lesson.id}">${lesson.room.typeRoom} -> ${lesson.readableStartHour} - ${lesson.readableEndHour} : Départment ${lesson.room.department.name} salle ${lesson.room.number}</a>
					<c:if test="${not empty lesson.absences}">
						<ul>
						<c:forEach var="absence" items="${lesson.absences}">
							<li>${absence.student.firstname} ${absence.student.lastname}</li>
						</c:forEach>
						</ul>
					</c:if>
				</li>
			</c:forEach>
		</ul>
	</jsp:body>
</t:wrapper>